/*
import { defineStore } from 'pinia'
/!*
import { login } from '@/api/auth'
*!/

export const useAuthStore = defineStore('auth', {
    state: () => ({
        token: localStorage.getItem('token') || null,
        username: ''
    }),
    actions: {
        async login(username, password) {
            const { data } = await login(username, password)
            this.token = data.token
            this.username = username
            localStorage.setItem('token', data.token)
        },
        logout() {
            this.token = null
            this.username = ''
            localStorage.removeItem('token')
        }
    }
})*/
